<!-- addEditCatalog.html 2017-04-25 13:21:24-->

<div class="ibox">
	<div class="ibox-title">
		<h5>目录编辑</h5>
		<div class="pull-right">
			#if(articleCatalog.id) <a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(articleCatalog.id))">新增子目录</a>  
			<a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(articleCatalog.parent_id))">新增同级目录</a>  #end
   		<a href="javascript:" style="font-size:12px;color:#666" onclick="closeEdit()">关闭</a>
    </div>
	</div>
	<div class="ibox-content">
		<form id="form" class="form-horizontal required-validate" method="post" action="saveCatalog" novalidate="novalidate" onsubmit="return validateCallback(this,thisAjaxDone)">
			<input type="hidden" name="articleCatalog.id" value="#(articleCatalog.id)"/>
			<input type="hidden" name="articleCatalog.parent_id" value="#(articleCatalog.parent_id)"/>
			#if(articleCatalog.id)
				<div class="form-group">
			   	<label class="col-xs-2 control-label">目录ID：</label>
			     <div class="col-xs-9" style="line-height: 31px">
			 		 #(articleCatalog.id)
			     </div>
			  </div>
			  #end
			<div class="form-group">
		   	<label class="col-xs-2 control-label">上级目录：</label>
		     <div class="col-xs-9" style="line-height: 31px">
		     #if(parentCatalog)#(parentCatalog.name)#else无#end
		     </div>
		  </div>
			
			<div class="form-group">
				<label class="col-xs-2 control-label">目录名称：</label>
				<div class="col-xs-9">
	
	<input type="text" class="form-control required" name="articleCatalog.name" value="#(articleCatalog.name)"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-2 control-label">封面图片：</label>
				<div class="col-xs-9">
	    	<div class="input-group">
    		<input type="text" class="form-control" name="articleCatalog.image" id="articleCatalog_image" value="#(articleCatalog.image)"/>
   			<span class="input-group-btn">
   				<button class="btn btn-primary" type="button" onclick="layer.open({content:'#(res_path)#(PRE_PATH)/common/files/upload?directory=article&input=articleCatalog_image',area: ['600px', '200px'],type: 2,title: '上传文件'})">上传</button>
   			</span>
   	</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-2 control-label">分类模板：</label>
				<div class="col-xs-4">
					<input type="text" class="form-control " name="articleCatalog.catalog_tpl" value="#(articleCatalog.catalog_tpl??"catalog.html")"/>
				</div>
				<label class="col-xs-2 control-label">列表模板：</label>
				<div class="col-xs-4">
					<input type="text" class="form-control " name="articleCatalog.list_tpl" value="#(articleCatalog.list_tpl??"list.html")"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-2 control-label">详情模板：</label>
				<div class="col-xs-4">
					<input type="text" class="form-control " name="articleCatalog.show_tpl" value="#(articleCatalog.show_tpl??"show.html")"/>
				</div>
				<label class="col-xs-2 control-label">自定义链接：</label>
				<div class="col-xs-4">
					<input type="text" class="form-control " name="articleCatalog.custom" value="#(articleCatalog.custom)"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-2 control-label">排序编号：</label>
				<div class="col-xs-4">
			<input type="text" class="form-control digits required" name="articleCatalog.sort" value="#(articleCatalog.sort??"100")"/>
				</div>
				<label class="col-xs-2 control-label">状态：</label>
				<div class="col-xs-4">
			#for(item:data("SHIFOU"))
			<label style="font-weight:normal;line-height: 35px"><input class="required" type="radio" name="articleCatalog.enable_flag" #if(articleCatalog.enable_flag)#if(articleCatalog.enable_flag==item.key)checked="checked"#end#elseif(item.key=="T")checked="checked"#end value="#(item.key)"/> #(item.value.name) </label>
			#end
				</div>
			</div>
		  <div class="form-group">
		   	<div class="col-xs-9 col-xs-offset-2">
		     	<button type="submit" class="btn btn-primary">保存</button>
		     	#if(articleCatalog.id)
		     		  <a class="btn btn-danger" href="deleteCatalog?id=#(articleCatalog.id)" target="ajaxTodo" title="确定删除吗？" callback="deleteAjaxTodo">删除</a>
		     	#end
		    </div>
		  </div>
		</form>
 	</div>
</div>